﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CampWeek5__Book_Project_.Data.Model
{
    public class Book
    {
       
        public int Id { get; set; }
        [Index]
        public int ISBN { get; set; }
        [Required]
        public string Title { get; set; }
        [Display(Name = "First Publication Date")]
        [Column(TypeName = "datetime2")]
        public DateTime PubDate { get; set; }
        public string Summary { get; set; }
        [Display(Name = "url for book image")]
        public string BookImg { get; set; }
        public int TimesViewed { get; set; }
        public DateTime? DateDeleted { get; set; }
        public int AuthorId { get; set; }
        public virtual Author Author { get; set; }
        public virtual List<Book_Tags> Book_Tags { get; set; }
        public virtual List<Rating> BookRatings { get; set; }

    }

}